package bean;

//建立学生表t_student
//列有：pk_studentId(学号)    s_name(姓名)   fk_classId(班级编号)
public class StudentBean {
    //学生学号
    private int studentId;
    //学生姓名
    private String studentName;
    //学生的班级
    private ClassBean classBean;

    public StudentBean(String studentName, ClassBean classBean) {
        this.studentName = studentName;
        this.classBean = classBean;
    }

    public StudentBean() {
    }

    public int getStudentId() {
        return studentId;
    }

    public void setStudentId(int studentId) {
        this.studentId = studentId;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public ClassBean getClassBean() {
        return classBean;
    }

    public void setClassBean(ClassBean classBean) {
        this.classBean = classBean;
    }

    @Override
    public String toString() {
        return "StudentBean{" +
                "学生编号：" + studentId +
                ", 学生姓名：'" + studentName + '\'' +
                ", 班级：" + classBean.getClassName() +
                '}';
    }
}
